package com.work.shart.web.entity.goods;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.work.shart.common.mybatis.entity.BaseEntity;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.*;

/**
 * <p>
 * 评论
 * </p>
 *
 * @author cong
 * @since 2022-03-23
 */
@Data
@ToString(callSuper = true)

@TableName("goods_comment")
public class GoodsCommentEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    /**
     * 文章id
     */
    @ApiModelProperty("文章id")
    @TableField("goods_id")
    private Long goodsId;

    /**
     * 评论内容
     */
    @ApiModelProperty("评论内容")
    @TableField("content")
    private String content;

    /**
     * 评论用户id
     */
    @ApiModelProperty("评论用户id")
    @TableField("user_id")
    private Long userId;

    /**
     * 回复评论id
     */
    @ApiModelProperty("回复评论id")
    @TableField("parent_id")
    private Long parentId;

    /**
     * 评论日期
     */
    @ApiModelProperty("评论日期")
    @TableField("comment_date")
    private LocalDate commentDate;

    /**
     * 审核状态(0待审核、1审核拒绝、2审核通过)
     */
    @ApiModelProperty("审核状态(0待审核、1审核拒绝、2审核通过)")
    @TableField("audit_status")
    private String auditStatus;


    @TableField(exist = false)
    @ApiModelProperty("子评论")
    private List<GoodsCommentEntity> child;
}
